#include "Text2D.h"

using namespace GalliumEngine;

Text2D::Text2D(void) : UIControl("MISSING")
{
}

Text2D::Text2D(std::string _id) : UIControl(_id)
{
}

Text2D::~Text2D(void)
{
}


void Text2D::setText(std::string _text)
{
	text = _text;
}

void Text2D::setFont(std::string _fontFile, int _fontSize)
{
	fontSize = _fontSize;
	font = ResourceManager::getInstance()->loadFont(_fontFile,_fontSize);
}

void Text2D::initialize(std::string _fontFile, std::string _text, int _fontSize, Vector2 _position, float _depth, Colour _colour)
{
	setPosition(_position);
	text = _text;
	fontSize = _fontSize;
	setDepth(_depth);
	setColour(_colour);

	font = ResourceManager::getInstance()->loadFont(_fontFile,_fontSize);
}

void Text2D::deinitialize()
{
}

void Text2D::update(float delta)
{

}

void Text2D::draw()
{
	/*Matrix4 view = this->getScene()->getActiveOrthographicCamera()->getObjectToWorld();
	Matrix4 projection = this->getScene()->getActiveOrthographicCamera()->getProjectionMatrix();
	font->print(text,(int)getPosition()[0],(int)getPosition()[1],getDepth(),fontSize,getColour(),view,projection);*/
}
